
using System;
using System.Runtime.Serialization;

namespace ICIA.ARojas.Silverlight.Entities
{
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name = "Persona", Namespace = "http://schemas.datacontract.org/2004/07/ICIA.ARojas.AccesoDatos.Entidades")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(ICIA.ARojas.Silverlight.Entities.Persona))]
    public partial class Persona : object, System.ComponentModel.INotifyPropertyChanged
    {
        #region Private Members

        private Especialidad EspecialidadField;
        private Grado GradoField;
        private int IdField;
        private string CodigoField;
        private string NombreField;
        private string ApellidosField;
        private DateTime? FechaNacimientoField;
        private DateTime? FechaEgresoField;
        private string GUIDField;
        private string CIField;
        private string CIExpedidoEnField;
        private string CedulaMilitarField;

        #endregion

        #region constructor
        public Persona()
        {
        }
        #endregion

        #region Public Properties


        [System.Runtime.Serialization.DataMemberAttribute()]
        public Especialidad Especialidad
        {
            get
            {
                return this.EspecialidadField;
            }
            set
            {
                this.EspecialidadField = value;
                this.RaisePropertyChanged("Especialidad");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public Grado Grado
        {
            get
            {
                return this.GradoField;
            }
            set
            {
                this.GradoField = value;
                this.RaisePropertyChanged("Grado");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public int Id
        {
            get
            {
                return this.IdField;
            }
            set
            {
                this.IdField = value;
                this.RaisePropertyChanged("Id");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Codigo
        {
            get
            {
                return this.CodigoField;
            }
            set
            {
                this.CodigoField = value;
                this.RaisePropertyChanged("Codigo");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Nombre
        {
            get
            {
                return this.NombreField;
            }
            set
            {
                this.NombreField = value;
                this.RaisePropertyChanged("Nombre");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Apellidos
        {
            get
            {
                return this.ApellidosField;
            }
            set
            {
                this.ApellidosField = value;
                this.RaisePropertyChanged("Apellidos");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public DateTime? FechaNacimiento
        {
            get
            {
                return this.FechaNacimientoField;
            }
            set
            {
                this.FechaNacimientoField = value;
                this.RaisePropertyChanged("FechaNacimiento");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public DateTime? FechaEgreso
        {
            get
            {
                return this.FechaEgresoField;
            }
            set
            {
                this.FechaEgresoField = value;
                this.RaisePropertyChanged("FechaEgreso");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string GUID
        {
            get
            {
                return this.GUIDField;
            }
            set
            {
                this.GUIDField = value;
                this.RaisePropertyChanged("GUID");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CI
        {
            get
            {
                return this.CIField;
            }
            set
            {
                this.CIField = value;
                this.RaisePropertyChanged("CI");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CIExpedidoEn
        {
            get
            {
                return this.CIExpedidoEnField;
            }
            set
            {
                this.CIExpedidoEnField = value;
                this.RaisePropertyChanged("CIExpedidoEn");
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CedulaMilitar
        {
            get
            {
                return this.CedulaMilitarField;
            }
            set
            {
                this.CedulaMilitarField = value;
                this.RaisePropertyChanged("CedulaMilitar");
            }
        }

        #endregion

        public override string ToString()
        {
            //Aqui pueden cambiar el return a por ejemplo la concatenacion de propiedades			
            return Apellidos + " " + Nombre;
        }

        #region INotifyPropertyChanged
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        protected void RaisePropertyChanged(string propertyName)
        {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null))
            {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion

    }
}


